import request from '@/sheep/request';

export default {
    	//报名审核列表
	getRecruitmentApplyApproveList: (params) =>
    request({
        url: 'api/recruitment_apply/approve_list',
        method: 'GET',
        params,
        custom: {
            showLoading: true,
            loadingMsg: '加载中',
            showError: true,
            showSuccess: false,
            errorMsg: '',
            auth: true,
            successMsg: false,
        },
    }),
//报名列表
getRecruitmentApplyApplyIndex: (params) =>
    request({
        url: 'api/recruitment_apply',
        method: 'GET',
        params,
        custom: {
            showLoading: true,
            loadingMsg: '加载中',
            showError: true,
            showSuccess: false,
            errorMsg: '',
            auth: true,
            successMsg: false,
        },
    }),
    //报名详情
	getRecruitmentView: (params) =>
		request({
			url: 'api/recruitment_apply/view',
			method: 'GET',
			params,
			custom: {
				loadingMsg: true,
			},
		}),
//报名审核通过
getRecruitmentApplyPass: (params) =>
    request({
        url: 'api/recruitment_apply/pass',
        method: 'GET',
        params,
        custom: {
            showLoading: true,
            loadingMsg: '加载中',
            showError: true,
            showSuccess: true,
            errorMsg: '',
            auth: true,
            successMsg: false,
        },
    }),
//报名审批拒绝
getRecruitmentApplyRefuse: (params) =>
    request({
        url: 'api/recruitment_apply/refuse',
        method: 'POST',
        params,
        custom: {
            showLoading: true,
            loadingMsg: '加载中',
            showError: true,
            showSuccess: true,
            errorMsg: '',
            auth: true,
            successMsg: false,
        },
    }),
    // 报名添加
    postbmRecruitmentApply: (data) =>
    request({
        url: 'api/recruitment_apply/apply',
        method: 'POST',
        data,
        custom: {
            showLoading: true,
            loadingMsg: '加载中',
            showError: true,
            showSuccess: true,
            errorMsg: '',
            auth: true,
            successMsg: false,
        },
    }),
    // 获取报名列表（负责人）
    getlistForPrincipal: (data) =>
        request({
            url: 'api/recruitment_apply/getlist_for_principal',
            method: 'POST',
            data,
            custom: {
                showLoading: true,
                loadingMsg: '加载中',
                showError: true,
                showSuccess: true,
                errorMsg: '',
                auth: true,
                successMsg: false,
            },
        }),
    // 移除报名人员
    getDelApply: (data) =>
        request({
            url: 'api/recruitment_apply/del_apply',
            method: 'POST',
            data,
            custom: {
                showLoading: true,
                loadingMsg: '加载中',
                showError: true,
                showSuccess: true,
                errorMsg: '',
                auth: true,
                successMsg: false,
            },
        }),
     // 导出报名人员数据
     getExportUserlist: (data) =>
        request({
            url: 'api/recruitment_apply/export_userlist',
            method: 'POST',
            data,
            custom: {
                showLoading: true,
                loadingMsg: '加载中',
                showError: true,
                showSuccess: true,
                errorMsg: '',
                auth: true,
                successMsg: false,
            },
        }),
           
    // 取消报名
    getrecruitmentApply: (params) =>
        request({
            url: 'api/recruitment_apply/cancel',
            method: 'GET',
            params,
            custom: {
                showLoading: true,
                loadingMsg: '加载中',
                showError: true,
                showSuccess: true,
                errorMsg: '',
                auth: true,
                successMsg: false,
            },
        }),
};